package com.qdu.servlet;

import com.qdu.entity.PublicActivity;
import com.qdu.service.PublicActivityService;
import com.qdu.service.impl.PublicActivityServiceImpl;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Daniel
 */
@WebServlet("/gabus")
public class GetActivityByUnoServlet extends HttpServlet{
    
    PublicActivityService pas=new PublicActivityServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        int Uno= Integer.parseInt(req.getParameter("Uno"));
        List<PublicActivity> list = pas.findPublicActivityByUno(Uno);
        req.setAttribute("pa_list", list);
        req.getRequestDispatcher("/ActivityOfMe.jsp").forward(req, resp);
    }
    
}
